-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CHI-2763 Check for an active contact & complete task #698
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
functions/checkTaskAssignment.ts
Outdated
taskSid, | ||
}); | ||
|
||
console.log('>>> checkTaskStatus Result:', result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this logs before merging? Or keep it a while but let's remember to cleanup at some point.
action: 'complete'; | ||
taskSid: string; | ||
targetSid: string; | ||
finalTaskAttributes: TaskInstance['attributes']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do this finalTaskAttributes
come from? 🤔 Is that from the supervisor Flex instance? If so, how are those computed? (Maybe I'll answer this question after reviewing the other PR).
if (!token || token === undefined) { | ||
resolve(error400('token')); | ||
return; | ||
} | ||
|
||
try { | ||
const tokenResult: TokenValidatorResponse = await validator( | ||
token as string, | ||
accountSid, | ||
authToken, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks great, but have you checked if tokenResult
is not included in the event
?
Description
This PR introduces two new public functions:|
checkTaskAssignment.ts
that checks whether a specific call/chat (identified by taskSid) is active.completeTaskAssignment.ts
allows a supervisor to switch the assignment status to complete a task.Checklist
Other Related Issues
None
Verification steps
AFTER YOU MERGE
You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P